Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide symbols from the NIF shared library #1589

Merged
merged 1 commit into from
Mar 6, 2025
Merged

Conversation

jonatanklosko
Copy link
Member

This compiles the NIF shared library with -fvisibility=hidden, hiding all symbols other than the NIF init required by ERTS. I believe this is a good default for NIFs in general, it avoids symbol clashes (e.g. when multiple NIFs use the same external library, possibly with different versions), and it can also improve performance and linking time.

For more details see elixir-nx/fine#2 (comment).

@jonatanklosko jonatanklosko merged commit 522eb27 into main Mar 6, 2025
8 checks passed
@jonatanklosko jonatanklosko deleted the jk-visibility branch March 6, 2025 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants